﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：TongTongMallBaseController.cs
// 功能描述：TongTongMall.WebApi
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using TongTongMall.Events;
using TongTongMall.Runtime.Session;

namespace TongTongMall.WebApi.WebApi.Controllers
{
    public class TongTongMallBaseController : ApiController
    {
        /// <summary>
        /// 当前登录的用户session信息，从线程内的claim内获取
        /// </summary>
        public ITongTongMallSession Session { get; set; }

        /// <summary>
        /// 事件总线
        /// </summary>
        public IEventBus EventBus { get; set; }

        public TongTongMallBaseController()
        {
            Session = NullSession.Instance;

            EventBus = NullEventBus.Instance;
        }
    }
    
}
